{template file="member/header.html"/}
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">发件箱</li>
    </ul>
    <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
        	<table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
        </div>
    </div>
</div>
<script type="text/html" id="barTool">
    <a data-open='{:url("read_only")}?id={{ d.id }}' data-width="400" data-height="350" title="查看发件箱" class="layui-btn layui-btn-xs">查看</a>
</script>
{template file="member/layui.html"/}
<script>
layui.use('yznTable', function() {
    var yznTable = layui.yznTable,
        $ = layui.$,
        form = layui.form;

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTable',
    };

    yznTable.render({
        init: init,
        toolbar: ['refresh'],
        url: '{:url("outbox")}',
        search:false,
        cols: [
            [
                { type: 'checkbox', fixed: 'left' },
                { field: 'subject', title: '标题' },
                { field: 'send_to', width: 120, title: '收件人' },
                { field: 'status', width: 100,align:'center', title: '收件人状态',templet: yznTable.formatter.label,selectList:{0:'未读',1:'已读'},search:false},
                { field: 'create_time', width: 200,  title: '发送时间' },
                { fixed: 'right', width: 100, title: '操作', templet: '#barTool' }
            ]
        ],
        page: {}
    });
});
</script>
{template file="member/footer.html"/}